﻿@model IList<WineStore.Models.AboutUs>
@{
    ViewBag.Title = "ShowAboutUs";
    Layout = "~/Views/Shared/AdminLayout.cshtml";
}

@section Styles
{
    <style type="text/css">
        td {
            text-align: center;
            vertical-align: middle;
        }
    </style>
}
@section Scripts
{
    <!--Sử dụng cho row hover-->
    <script type="text/javascript">
        $(document).ready(function () {
            $("tr").not(':first').hover(function () {
                $(this).css("background", "#F0FFFF");
            }, function () {
                $(this).css("background", "");
            }
            );
        });
    </script>
}
<!-- Table (TABLE) -->
@if (Session["Admin"] != null)
{
    <h3 class="tit">About Us
    </h3>
    using (Html.BeginForm())
    {
    <table border="1px;" style="width: 100%">
        <tr>
            <th>Content (English)
            </th>
            <th>Content (German)
            </th>
            <th>Event
            </th>
        </tr>
        @foreach (var item in Model)
        {
            <tr>
                <td style="text-align:left;">
                    @Html.Raw(item.AboutUsContent_EN)
                </td>
                <td style="text-align:left;">
                    @Html.Raw(item.AboutUsContent_GER)
                </td>
                <td>
                    @Html.ActionLink("Edit", "EditAboutUs", new { id = item.AboutUsId })
                </td>
            </tr>
        }
    </table>
    }
}
else
{
    Response.Redirect("~/Admin/LogOn/");
}